//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.buba.pojoVo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.buba.pojo.user.PatientCard;
import com.buba.pojo.user.User;
import com.buba.utils.dateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@ApiModel(
        value = "ThePatient对象",
        description = "就诊人表"
)
@Data
public class ThePatientVo2 implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @TableId(
            value = "id",
            type = IdType.ID_WORKER
    )
    private Integer id;
    @ApiModelProperty("用户id")
    private Integer userId;
    @ApiModelProperty("姓名")
    private String name;



    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "生日")
    private Date birthday;

    @ApiModelProperty(value = "姓别")
    private String sex;

    @ApiModelProperty("年龄")
    private Integer age;

    public Integer getAge() {

        Integer age1 = 0;

        try {
            age1 = dateUtils.getAge(birthday);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return age1;
    }

    public void setAge(Integer age) {
        this.age = age;
    }


    @ApiModelProperty("与本人关系（本人 子女 夫妻 父母 朋友）")
    private String relation;
    @ApiModelProperty("证件类型")
    private String documentType;
    @ApiModelProperty("证件号码")
    private String number;
    @ApiModelProperty("就诊卡号")
    private String hospitalNumber;
    @ApiModelProperty("手机号码")
    private String phone;
    @ApiModelProperty("就诊人地址")
    private String address;
    @ApiModelProperty("是否为默认就诊人（是 否）")
    private String defaultPerson;
    @ApiModelProperty("是否住院（是否）")
    private String hospitalization;
    @ApiModelProperty("住院天数")
    @TableField("Days")
    private Integer Days;
    @ApiModelProperty("创建时间")
    private Date creationTime;
    @ApiModelProperty("修改时间")
    private Date modificationTime;
    private User user;
    private PatientCard patientCard;

}
